courses = {
    '吕红': '数据库',
    '肖杨': 'python',
    '丁锦': '英语',
    '周婷': '线性代数',
    '李娟': '数据库',
    '周琳琳': 'java',
}
courses['赵红'] = 'java'
courses['周琳琳'] = 'python'
del courses['周婷']
print('所有教师及讲授的课程：')
for teacher, courses in courses.items():
    print(f'{teacher}:{courses}')
print('讲授 python 的教师：')
for teacher, course in courses.items():
    if course == 'python':
        print(teacher)
username = input('请输入用户名：')
password = input('请输入密码：')
attempts = 0
while attempts < 3:
    if username == 'admin' and password =='123456':
        print('登录成功')
        break
    else:
        print('用户名或密码错误，请重新输入！')
        attempts += 1
        if attempts < 3:
            username = input('请输入用户名：')
            password = input('请输入密码：')
        else:
            print('用户名已被锁定，请稍后再试。')
            break
input_str = input('请输入一个字符串：')
unique_chars = sorted(set(input_str))
print('去重新按字符升序输出：')
print(''.join(unique_chars))
courses = {
    '吕红': '数据库'
    '肖扬': 'python'
    '丁锦': '英语'
    '周婷': '线性代数'
    '李娟': '数据库'
    '周琳琳': 'java'
}
